import cv2
import numpy as np
img = cv2.imread('tutu111.jpg')
rows = len(img)
cols = len(img[0])
M = np.float32([[-1,0,50],
                [0,-1,100]])
dst = cv2.warpAffine(img,M,(cols,rows))
cv2.imshow('Input',img.waitKey())
cv2.imshow('Trans',dst)
cv2
cv2.destroyAllWindows()